$(document).ready(function(){
	// User_menu show/hide submenu
	$("#user_menu .with_sub").hover(function(){
		$(this).find("ul").show();
	},
	function(){
		$(this).find("ul").hide();
	});
	
	// Flash messages effect
	$("#FlashMessage").slideDown('slow').delay(3000).slideUp('slow');
    
	// Open login box in situ
        $('#login_open').click(function(e) {
            e.preventDefault();
            $('#login').slideToggle('slow', function(){});
        });

	// Apply the UniForm plugin to pulldows and button
	$("input:file, textarea, select, button, .search select, .search button, .filters select, .filters button, #comments form button, #contact form button, .user_forms form button, .add_item form select, .add_item form button, .modify_profile select, .modify_profile button").uniform({fileDefaultText: fileDefaultText,fileBtnText: fileBtnText});

	// Show advanced search in internal pages
	$("#expand_advanced").click(function(e){
		e.preventDefault();
		$(".search .extras").slideToggle();
	});
	
	// Show/hide Report as 
	$("#report").hover(function(){
		$(this).find("span").show();
	},
	function(){
		$(this).find("span").hide();
	});
    jQuery(document).ready(function(){

    /* initialize the form validation */
    //jQuery("#mainform").validate({errorClass: "invalid"});

    /* featured listings slider */
    jQuery(".slider").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
        visible: 4,
        hoverPause:true,
                    auto: 2800 ,
                    speed: 1100,        //easing: "easeOutQuint" // for different types of easing, see easing.js
    }); 

});

});